home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-21 / qwhite.zip / STEALTH.TEC < prev    next >
Text File  |  1992-03-09  |  22KB  |  440 lines

  1. ID:Q6 Trouble-shooting Stealth
  2. Quarterdeck Technical Note #205
  3. by the Quarterdeck Compatibility Dept.
  4.  
  5.                          TROUBLE-SHOOTING STEALTH
  6.  
  7.      This document discusses how to diagnose and cure problems occasioned by 
  8. the use of the Stealth feature of QEMM-386, version 6.  All users should 
  9. review the readq.me file that comes with QEMM-386, version 6 for additional 
  10. information.
  11.  
  12. FIRST STEP
  13.      The first step is to ascertain whether Stealth is involved with the 
  14. problem.  Remove the Stealth parameter (ST:M or ST:F) from the QEMM-386 line 
  15. of the config.sys.  Reboot the computer and try to duplicate the problem.  If 
  16. the problem still happens then Stealth is not causing the problem and you must 
  17. address the problem by the means explained in the troubleshooting section of 
  18. the QEMM-386 manual.
  19.  
  20. SECTION 1
  21.  
  22.     SECOND STEP
  23.          If Stealth is involved in the problem restore the Stealth 
  24.     parameter (ST:M) and add XST=F000.  Reboot the computer.  If this 
  25.     works, go to the third step;  if this does not work, go to Section 
  26.     Two. On this step the QEMM-386 line of the config.sys should look 
  27.     something like: 
  28.  
  29.           device=c:\qemm\qemm386.sys ram st:m xst=f000
  30.  
  31.     THIRD STEP
  32.          If XST=F000 solves your problem replace it with X=F000-FFFF, 
  33.     reboot and try again.  The QEMM-386 line of the config.sys should 
  34.     look something like:
  35.  
  36.           device=c:\qemm\qemm386.sys ram st:m x=f000-ffff
  37.  
  38.          If this works, add the parameter FSTC to the qemm line, thusly:
  39.  
  40.           device=c:\qemm\qemm386.sys ram st:m x=f000-ffff fstc
  41.     
  42.     and reboot.  If this works continue;  if this does not work (and 
  43.     FSTC may not work in all circumstances) then remove the FSTC 
  44.     parameter and reboot with the previous QEMM-386 line.  See the 
  45.     section about FSTC below for an explanation of FSTC. 
  46.          In either case, enter Manifest and look at the QEMM- 
  47.     386/Analysis screen.  Look at the last line:  It should look 
  48.     something like this:
  49.  
  50.                     Fn00 IIII IIII IIII IIOO
  51.  
  52.     The portions of the address space with the O in them are being 
  53.     accessed directly.  Some program or piece of hardware is trying to 
  54.     read the contents of the ROM here directly, not merely access them 
  55.     through interrupts.  This portion of the address space must be 
  56.     allowed to be accessed directly.  This is done by excluding QEMM-386 
  57.     from mapping this area.  In this case the target region is FE00-
  58.     FFFF.  The appropriate Exclude is X=FE00-FEFF. The correct QEMM-
  59.     386.SYS line of the config.sys is:
  60.  
  61.          device=c:\qemm\qemm386.sys ram st:m x=fe00-ffff 
  62.     
  63.     This Exclude allows Stealth to do its job and costs you only 8K of 
  64.     high address space.
  65.  
  66.     FOURTH STEP
  67.          If XST=F000 solves your problem while X=F000-FFFF does not then 
  68.     you should try using ST:F instead of ST:M.  You may get more high 
  69.     ram with ST:F than with ST:M XST=F000.  
  70.  
  71. SECTION TWO
  72.  
  73.      This section is only for users with video ROM.  Hercules-compatible 
  74. monochrome and CGA systems do not have video ROM and thus this section does 
  75. not apply.  Some machines have their video ROM elsewhere, usually E000-E7FF.  
  76. Such users should use E000 (or wherever their video ROM begins) instead of 
  77. C000.     
  78.  
  79.     FIFTH STEP
  80.          If XST=F000 does not solve your problem then try XST=C000. The 
  81.     QEMM-386 line of the config.sys should look like: 
  82.  
  83.          device=c:\qemm\qemm386.sys ram st:m xst=c000
  84.     
  85.     If XST=C000 does not work, go to Section Three.  If XST=C000 does 
  86.     work, go to the next step.
  87.  
  88.     SIXTH STEP
  89.          If XST=C000 solves the problem then try placing the page frame 
  90.     at C000.  Do this only if the entire C segment is available to put 
  91.     the page frame in.  The QEMM-386 line of the config.sys should look 
  92.     like:
  93.  
  94.          device=c:\qemm\qemm386.sys ram st:m fr=c000
  95.  
  96.     If this works then this may be acceptable solution.  All the address 
  97.     space in which high ram can be created is being used in this 
  98.     configuration.  If this step does not work or, if you cannot put the 
  99.     page frame at C000, go to the seventh step.
  100.  
  101.     SEVENTH STEP
  102.          If XST=C000 solves the problem but you do not want to (or 
  103.     cannot) put the page frame at C000 then try the parameter 
  104.     FASTINT10:N, where "N" tells QEMM-386 to allow the video ROM's own 
  105.     code to be used.  By default QEMM-386 replaces some of the video 
  106.     ROM's code with its own video code.  This parameter tells QEMM to 
  107.     use the ROM's code.  The QEMM-386 line of the config.sys should look 
  108.     like:
  109.  
  110.          device=c:\qemm\qemm386.sys ram st:m fastint10:n
  111.  
  112.     If this works then all ROMs are being Stealthed.  You may choose to 
  113.     try the eighth step as an alternative though.  If this does not 
  114.     work, go to the next step.  There is a further discussion of 
  115.     FASTINT10 below.
  116.  
  117.     EIGHTH STEP
  118.          If XST=C000 solves the problem but FR=C000 or FASTINT10:N does 
  119.     not (or you cannot put the page frame at C000 or do not want to use 
  120.     FASTINT10:N) then replace XST=C000 with X=C000-C7FF.  The QEMM-386 
  121.     line of the config.sys should look like:
  122.  
  123.          device=c:\qemm\qemm386.sys ram st:m x=c000-c7ff 
  124.  
  125.     If this works, add the parameter FSTC to the QEMM-386 line, thusly:
  126.  
  127.          device=c:\qemm\qemm386.sys ram st:m x=c000-c7ff fstc
  128.     
  129.     and reboot.  If this works continue;  if this does not work (and 
  130.     FSTC may not work in all circumstances) then remove the FSTC 
  131.     parameter and reboot with the previous QEMM-386 line.  See the 
  132.     section about FSTC below for an explanation.
  133.          In either case, enter Manifest, go to the QEMM-386/Analysis 
  134.     screen, and look at the Cn00 line.  It should look something like 
  135.     this:
  136.  
  137.                        Cn00 OIII IIII OOOO OOOO
  138.  
  139.     This indicates that the first 4K region of the C segment, in the 
  140.     video ROM, is being accessed directly.  This portion of the address 
  141.     space must be Excluded when QEMM-386 is Stealthing.  The appropriate 
  142.     QEMM-386 line in the config.sys is:
  143.  
  144.          device=c:\qemm\qemm386.sys ram st:m x=c000-c0ff 
  145.  
  146. SECTION THREE
  147.  
  148.      NINTH STEP
  149.           On some machines there are other ROMs that can be Stealthed; 
  150.     often these are disk ROMs.  The same procedure:  trying XST=??00, 
  151.     then replacing it with the appropriate Exclude of the old kind 
  152.     (X=??00-!!FF) to see if the problem is related to Stealthing or just 
  153.     not having some portion of the ROM's address space directly 
  154.     accessible, can be used.  The trick of making the page frame begin 
  155.     at the beginning of the disk ROM may also work here as well.  If 
  156.     XST=??00 solves your problem, try replacing it with FR=??00, 
  157.     presuming that there is a 64K portion of the address space free 
  158.     beginning at ??00 and that ?? is a multiple of 16.  If some portion 
  159.     of the address space must be Excluded for Stealth to work you should 
  160.     check Analysis with the FSTC and X=??00-!!FF parameters on the QEMM 
  161.     line.
  162.           Because of the way the ROMs are written for the IBM PS/2 
  163.     machines, and, perhaps, other Microchannel machines, it is necessary 
  164.     to load HOOKROM.SYS before QEMM386.SYS in the CONFIG.SYS for 
  165.     XST=E000 to work.  For example:
  166.  
  167.           device=c:\qemm\hookrom.sys
  168.           device=c:\qemm\qemm386.sys ram st:m xst=e000
  169.          
  170.     TENTH STEP
  171.           Use XST=F000, XST=C000, XST=??00, and simultaneously for all 
  172.     ROMs being Stealthed.  Then replace the XSTs one by one with the 
  173.     appropriate regular Exclude (X=F000-FFFF, X=C000-C7FF, X=??00-
  174.     !!FF...), look at the QEMM-386/Analysis screen of Manifest and 
  175.     discover what portions of the address space need to be directly 
  176.     available.
  177.  
  178.     ELEVENTH STEP
  179.          If ST:M does not work try ST:F instead.  If ST:F does not work 
  180.     you should try ST:F XST=C000 (and XST=??00) for other Stealthed ROMs 
  181.     other than the one(s) overlain by the page frame.
  182.  
  183.     TWELFTH STEP
  184.          If none of these steps solve the problem please pin down 
  185.     exactly what program is failing (and at what point), and file a 
  186.     report with Quarterdeck.
  187.  
  188. INTERESTING QUESTIONS
  189.  
  190. WHAT SHOULD I DO IF QEMM REPORTS "CANNOT FIND ROM HANDLER FOR INTERRUPT XX"?
  191.      Load "hookrom.sys" at the beginning of the config.sys.  Use a line like:
  192.  
  193.      device=c:\qemm\hookrom.sys
  194.  
  195.      If this does not work then you may need to tell QEMM-386 to stop 
  196. Stealthing this interrupt.  The parameter which does this is XSTI=XX, where XX 
  197. is the number of the interrupt reported by the error message.  When you do 
  198. this you must do an Analysis with an Exclude (of the old kind) of the address 
  199. space being occupied by all Stealthed ROMs.
  200.      Here is a typical QEMM-386 line to do an Analysis:
  201.  
  202.      device=c:\qemm\qemm386.sys ram st:m xsti=70 fstc x=c000-cfff x=f000-ffff
  203.  
  204.      Reboot with this QEMM-386 line, look at the QEMM ANALYSIS MAP in 
  205. Manifest.  It may look something like:
  206.  
  207.            n=0123 4567 89AB CDEF
  208.         0n00 OOOO OOOO OOOO OOOO
  209.         1n00 OOOO OOOO OOOO OOOO
  210.         2n00 OOOO OOOO OOOO OOOO
  211.         3n00 OOOO OOOO OOOO OOOO
  212.         4n00 OOOO OOOO OOOO OOOO
  213.         5n00 OOOO OOOO OOOO OOOO
  214.         6n00 OOOO OOOO OOOO OOOO
  215.         7n00 OOOO OOOO OOOO OOOO
  216.         8n00 OOOO OOOO OOOO OOOO
  217.         9n00 OOOO OOOO OOOO OOOO
  218.         An00 OOOO OOOO OOOO OOOO
  219.         Bn00 OOOO OOOO OOOO OOOO
  220.         Cn00 IIII IIII OOOO OOOO
  221.         Dn00 OOOO OOOO OOOO OOOO
  222.         En00 OOOO OOOO OOOO OOOO
  223.         Fn00 OOOO IIII IIII IIIO
  224.  
  225. This indicates that the first 16K of the F segment is being accessed by the 
  226. INT 70 handler and must remain Excluded.  The final QEMM line for this case 
  227. is:
  228.  
  229.      device=c:\qemm\qemm386.sys ram st:m xsti=70 x=f000-f3ff
  230.  
  231. and we at Quarterdeck would very much like to know about the machine that is 
  232. reporting this error.
  233.      The only cause that we have seen is the case of some users on XT machines 
  234. with Inboards.  XTs do not have a second bank of hardware interrupts (which 
  235. use interrupts 70-77) but there are some ROMs on XTs that mistakenly report 
  236. that they do and QEMM-386 looks for the interrupt handler of some interrupts 
  237. that do not have handlers.  For such machines no Exclude is necessary because 
  238. there is no ROM code handling the interrupt.  In particular we would like to 
  239. know where this interrupt is pointing when Stealth is not being used.  This 
  240. can be discovered in Manifest on the First Meg Interrupts screen.
  241.  
  242.      INBOARD-PC USERS
  243.           Inboard-PC users may need xsti=70 xsti=74 xsti=75 xsti=76.  The 
  244.      device line is:
  245.  
  246.      device=c:\qemm\qemm386.sys ram st:m xsti=70 xsti=74 xsti=75 xsti=76
  247.  
  248. WHAT IS FASTINT10:N?
  249.      QEMM-386, when Stealthing a video ROM, replaces some of the video ROM's 
  250. code with replacement code written by Quarterdeck.  This replacement code is 
  251. suitable for most video cards.  The FASTINT10:N (which may be abbreviated 
  252. F10:N) parameter tells QEMM-386 not to use its own replacement code but the 
  253. literal code of the video ROM.  This in no way limits the amount of high RAM 
  254. Stealth creates and may be acceptable solution for those users who need it.  
  255. It should only be necessary on unusual video cards.  If placing the page frame 
  256. at the beginning of the video card's ROM works or if a small regular Exclude 
  257. also solves the problem you may choose to use this solution instead.     
  258.  
  259. WHAT IS FSTC?  
  260.      The purpose of the FSTC parameter is to make the Analysis procedure 
  261. accurate.  Some system and video ROMs may not function properly with the FSTC 
  262. parameter.  If this is the case on your system you will have to perform the 
  263. Analysis procedure without the FSTC parameter. However, you should be aware in 
  264. this case that some of the Exclude statements that Analysis prompts you to use 
  265. may not be necessary.  You can try reducing these Excludes on a trial-and-
  266. error basis if you wish.
  267.      When QEMM-386 Stealths a ROM certain tables may have to be stored by QEMM-
  268. 386 in its own data area.  This uses a few kilobytes of high RAM.  When a ROM 
  269. is being Stealthed but the address in which the ROM resides is Excluded (as 
  270. with X=C000-C7FF) then QEMM-386 cleverly figures out that it does not need to 
  271. make copies of these tables in its own data area so it saves this memory by 
  272. not making copies of the tables.  This means that when you do Exclude the 
  273. portion(s) of the ROM where these tables are stored the ROM will be accessed 
  274. directly though it would not be if it were not Excluded.  This will cause 
  275. Analysis to report that a portion of the address space is OK when Excluded 
  276. even though it would not be accessed directly were it not Excluded.
  277.      FSTC (FORCESTEALTHTABLECOPY) forces QEMM-386 to make copies of these 
  278. tables so that inappropriate Excludes are not recommended for the above 
  279. reason.  FSTC should only be used when you are testing a portion of a ROMs 
  280. address space for direct access by Excluding the whole ROM.  It is not an 
  281. appropriate parameter for a final configuration.
  282.  
  283. WHAT ARE ADVANCED DISK FEATURES?
  284.      The BIOS has a set of function calls intended for use by multitasking 
  285. programs.  These are Int 15, functions 90 and 91.  The system ROM or disk ROM 
  286. may issue the Int 15, fn 90 call while it is waiting for the disk controller 
  287. to read or write a sector, allowing other programs to execute during this 
  288. wait.  When the sector is ready, the disk interrupt handler issues an Int 15, 
  289. Fn 91, signaling the multitasking program that the disk information is ready 
  290. to be processed by the system or disk ROM.  Some disk caches hook this call to 
  291. allow your system to go ahead and execute your current program while the 
  292. system or disk ROM is waiting for its requested sector.  Whereas these caches 
  293. preserve the stack and register state for the BIOS and the application when 
  294. doing this pseudo-multitasking, they do not preserve the mapping of the page 
  295. frame.  Therefore, if the BIOS uses the page frame itself (as does Stealth), 
  296. this could generate conflicts and system failures.  Since no known disk cache 
  297. does the proper page frame preservation, QEMM automatically suppresses INT 15, 
  298. function 90 calls from the BIOS, effectively disabling advanced disk features.  
  299. Caches that save and restore the page frame when using advanced disk features 
  300. can use a programming interface to QEMM-386 to reenable advanced disk 
  301. features.
  302.      You may defeat QEMM-386's defeating of this feature with the 
  303. VIRTUALHDIRQ:N (VHI:N) parameter on the QEMM-386 line of the config.sys. If 
  304. your cache has these "Advanced Features" and does not save and restore the 
  305. page frame you will crash or corrupt data on the cached drive(s).
  306.  
  307. WHAT IF I LOAD A DRIVER THAT USES ROM BEFORE QEMM-386?
  308.      If you want to load a device driver before QEMM-386 and it uses a ROM 
  309. then QEMM-386 can still Stealth this ROM if you load the driver HOOKROM.SYS 
  310. before this driver.  Here is an example:
  311.  
  312.      device=c:\qemm\hookrom.sys
  313.      device=c:\????????.sys
  314.      device=c:\qemm\qemm386.sys ram st:m
  315.  
  316. WHY DOES XST=E000 ONLY WORK ON PS/2 MACHINES IF I USE HOOKROM.SYS?
  317.      The code in the E000-EFFF portion of the ROM on PS/2 and, perhaps, other 
  318. Microchannel machines, is not directly pointed to by the interrupt table.  The 
  319. interrupt table points to addresses in F000-FFFF, which then point to the 
  320. appropriate code in the E000-EFFF segment.  You can see this in the 
  321. FirstMeg/Interrupts section of Manifest.  When you load HOOKROM.SYS, it traces 
  322. down the redirection of the interrupts to the place where the executing code 
  323. begins, so that interrupts that are serviced by code in the E000-EFFF segment 
  324. actually point to addresses in the E000-EFFF segment.  How to use HOOKROM.SYS 
  325. for this purpose is discussed in the last paragraph of the NINTH STEP of this 
  326. document.
  327.  
  328. WHY DOES MY SYSTEM SETUP NO LONGER COME UP WITH ST:M? 
  329.      On machines with a built-in system setup program in the BIOS ROM that can 
  330. be popped up at any time Stealth may make this feature inaccessible after you 
  331. have booted.  This is because the setup program accesses the ROM directly.  In 
  332. order for it to work after QEMM-386 has been loaded you must Exclude the 
  333. portion of the address space where it is stored.  On most machines this is in 
  334. F000-F7FF or thereabouts.  You may decide that it is better to use the system 
  335. setup only on boot and be able to use this portion of the address space for 
  336. high RAM when you are running.  This is the way many systems are these days 
  337. and you must reboot to implement the changes anyway so you may consider this a 
  338. fair trade.
  339.      Machines with a setup program that loads as a regular program may not 
  340. present this problem.
  341.  
  342. WHAT IS GOING ON?
  343.      With ST:M Stealth is moving out of the address space all ROMs accessed by 
  344. means of interrupts (you can see what interrupts are being handled by what 
  345. ROMs in the First Meg/Interrupts screen of Manifest when you are not 
  346. Stealthing.)  When these interrupts are asserted, QEMM-386 puts the ROM code 
  347. that services the interrupt into the page frame. With ST:F Stealth is allowing 
  348. the page frame to share the address space used by the ROM, making the 
  349. underlying ROM code available in the page frame when an interrupt pointing 
  350. into the ROM is asserted.
  351.  
  352. HOW CAN IT FAIL?
  353.       The Stealth technology relies on the practice of using the code in ROMs 
  354. only by means of interrupts.  With the exceptions listed below when the code 
  355. in a ROM is accessed directly the program or hardware using this code (or 
  356. information) will find high RAM there instead with ST:M and will malfunction.  
  357. Although this is not common it does happen.  Sometimes programs look for 
  358. identification information:  For video cards this usually happens in the 
  359. bottom 4K; for system BIOSes this usually happens in FE00-FEFF.  Most users 
  360. for whom Stealth fails can recover almost all the high RAM Stealth can create 
  361. with small Excludes of this kind.
  362.      Exceptions:
  363.  
  364.     1) QEMM-386 does not map High RAM into the last 64 bytes of the 
  365.     system BIOS ROM because they are commonly accessed directly.  
  366.     Accesses here do not cause Stealth a problem. 
  367.  
  368.     2)  When a ROM accesses itself directly then it should work IF the page
  369.     frame begins at this ROM's beginning address.  There are some video cards
  370.     and disk controllers that fail because the video ROM (disk ROM) does not
  371.     tolerate relocation.  The ready cure for this symptom is to put the page
  372.     frame at C000 (or whatever is the beginning of the appropriate video or
  373.     disk ROM) so that when an interrupt that points into the video ROM (disk
  374.     ROM) is asserted, and QEMM restores the contents of the video ROM (disk
  375.     ROM) into the page frame, the ROM code can access itself where it expects
  376.     to find itself; this is the purpose of step 6 of this method.
  377.  
  378.     3) Direct accesses of one ROM to another work with ST:F.
  379.  
  380. Disk caches that write directly to and read directly from the page frame cause 
  381. Stealth to fail unless the DISKBUFFRAME=?? (DBF=??) is used.
  382.  
  383. Stealth relies on there being interrupts pointing into a ROM in order to make 
  384. it a target for Stealthing.  If there is a ROM in the address space that QEMM-
  385. 386 cannot detect as being used then it will not be Stealthed.  This may 
  386. happen for some disk ROMs and for devices that use the ROM only upon 
  387. initialization.  If there is a ROM without an interrupt pointing into it it is 
  388. a suspect for being unused.  You should use the Analysis feature of QEMM-386 
  389. to discover if this ROM is being used at all.  If it is not then the address 
  390. space it occupies may be reclaimed with an INCLUDE.
  391.  
  392. SUMMARY 
  393.      The Stealth technology has been exhaustively tested but the wide variety 
  394. of software and hardware in the PC world has surprises in it for every 
  395. program.  The actual Stealthing of interrupts is very successful.  The most 
  396. common failure is due to programs (or other ROMs) trying to access a portion 
  397. of the ROM directly, rather than by means of interrupt. 
  398.      For this to work the target region of this access must be in the address 
  399. space at the time of access. This can be achieved by an appropriate exclude of 
  400. the old kind, usually at a cost of only 4K or 8K of the additional high RAM 
  401. Stealth is creating; see steps 3 through 11 for a procedure to figure these 
  402. Excludes out.  If the video ROM or adaptor ROM is the target ROM of a problem 
  403. then placing the page frame over the video ROM or adaptor ROM may work; see 
  404. step 6.  The "Advanced disk features" that some disk caches use are 
  405. incompatible with Stealth. QEMM-386 disables these by default whenever 
  406. possible if Stealth is used. Some disk caches write directly to the page 
  407. frame. Such caches should be told to use extended memory or the 
  408. DISKBUFFRAME=?? (DBF=??) should be used with QEMM-386; see step 2.  If you 
  409. have a problem intractable by any of these means Quarterdeck would like to 
  410. hear about it.
  411.  
  412.  
  413.   ************************************************************************
  414.   *This technical note may be copied and distributed freely as long as it*
  415.   *is distributed in its entirety and it is not distributed for profit.  *
  416.   *         Copyright (C) 1991-2 by Quarterdeck Office Systems           *
  417.   ************************ E N D   O F   F I L E *************************
  418.  
  419.  
  420.  
  421.  
  422.  
  423.  
  424.  
  425.  
  426.  
  427.  
  428.  
  429.  
  430.  
  431.  
  432.  
  433.  
  434.  
  435.  
  436.  
  437.  
  438.  
  439.  
  440.